package com.web.manager.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.web.manager.mapper.FileSubmitMapper;
import com.web.manager.pojo.FileSubmit;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class FileSubmitService extends ServiceImpl<FileSubmitMapper, FileSubmit> {
@Resource
private FileSubmitMapper fileSubmitMapper;

@Override
public boolean save(FileSubmit entity){

        return super.save(entity);
        }


public FileSubmit selectByUsername(String name){
        QueryWrapper<FileSubmit> queryWrapper = new QueryWrapper<>(); //条件查询器
        queryWrapper.eq("name",name);  // ==> where username = #{username}
        // 根据用户名查询数据库的用户信息
        return  this.getOne(queryWrapper); // ==>select * from manager_user where username = #{username}
        }



}
